import http from "@/utils/http";
import { AxiosRequestConfig } from "axios";

export interface GetRelationById_ {
  /**
   * @description metricsId
   * @format int32
   */
  metricsId: number;
}

export class MetricsRelation {
  /**
   * 关联指标
   *
   * @tags 指标关联
   * @request GET: /metrics-relation/relation-by-id
   * @secure
   */
  getRelationById = (query: { metricsId: number } | GetRelationById_, params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityMetricsRelationVO>({
      url: `/metrics-relation/relation-by-id`,
      method: "GET",
      params: query,
      ...params,
    });
}

export default new MetricsRelation();
